Day 20 將 Google Service Account 的金鑰(.json)檔案透過 EAS CLI 上傳至 Expo 服務器。
接著要重新構建 Android 應用程式,以便應用程式可以使用此金鑰提供的 Google FCM 服務。
> npx eas build -p android --profile preview
Loaded "env" configuration for the "preview" profile: no environment variables specified. Learn more
Specified value for "android.package" in app.json is ignored because an android directory was detected in the project.
EAS Build will use the value found in the native code.
✔ Using remote Android credentials (Expo server)
✔ Using Keystore from configuration: Build Credentials (一組編碼) (default)
Compressing project files and uploading to EAS Build. Learn more
✔ Uploaded to EAS 2s
Build details: https://expo.dev/accounts/(Expo 帳號)/projects/notificationprocess/builds/(一組識別碼)
Waiting for build to complete. You can press Ctrl+C to exit.
Build queued...
Start builds sooner in the priority queue.
Sign up for EAS Production or Enterprise at https://expo.dev/accounts/(Expo 帳號)/settings/subscriptions
Waiting in Free tier queue
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■|
✔ Build finished
(QR Code)
🤖 Open this link on your Android devices (or scan the QR code) to install the app:
https://expo.dev/accounts/(Expo 帳號)/projects/notificationprocess/builds/(一組識別碼)
✔ Install and run the Android build on an emulator? … yes
✔ Successfully downloaded app 7s
✖ Select an emulator to run your app on › (選一個實體手機來運行應用程式)
它的構建進度條耗時,是因為它會把構建完的應用程式打包上傳至 Expo 伺服器,之後就可以在上面直接下載每次構建版本的 APK 檔案。
或是直接掃瞄 terminal 上面的 QR Code,便能直接連到 Expo 提供的應用程式下載網址。